import { View, Text, StatusBar } from 'react-native'
import React from 'react'
import { Header } from '@rneui/themed'

export default function myHeader() {
  return (
    <>
      {/* Header中自带StatusBar，再用其它方法设置不起作用 */}
      <Header 
        backgroundColor='#090'
        centerComponent={{
          text: '智慧社区',
          style: {
            color: '#fff',
            fontSize: 16,
            fontWeight: 'bold'
          }
        }}
        // 是否隐藏状态栏
        hideStatusBar={false}
        statusBarProps={{
          backgroundColor: '#090'
        }}
        barStyle='light-content'
        rightComponent={{
          type: 'antdesign',
          icon: 'search1',
          color: '#fff'
        }}
        leftComponent={{
          icon: 'menu',
          color: '#fff',
          onPress: () => console.log('hhhh')
        }}
      />
    </>
  )
}